(init_frame_faces): Don't look at selected_frame unless it is an X frame.
authorRichard M. Stallman <rms@gnu.org>
Tue, 1 Jun 1993 19:23:38 +0000 (19:23 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 1 Jun 1993 19:23:38 +0000 (19:23 +0000)
src/xfaces.c

index c07bf035f5b13ba14413a2fba3a1b1857fef8593..e7aff5826c6fbc8639495bbbd7a6bf5cf49ded91 100644 (file)
@@ -471,15 +471,16 @@ init_frame_faces (f)
 
   /* Make sure that all faces valid on the selected frame are also valid
      on this new frame.  */
-  {
-    int i;
-    int n_faces = selected_frame->display.x->n_faces;
-    struct face **faces = selected_frame->display.x->faces;
+  if (FRAME_X_P (selected_frame))
+    {
+      int i;
+      int n_faces = selected_frame->display.x->n_faces;
+      struct face **faces = selected_frame->display.x->faces;
 
-    for (i = 2; i < n_faces; i++)
-      if (faces[i])
-       ensure_face_ready (f, i);
-  }
+      for (i = 2; i < n_faces; i++)
+       if (faces[i])
+         ensure_face_ready (f, i);
+    }
 }